package com.pda.common_easy.dialog.hm;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;

import com.pda.common_easy.PDApp;
import com.pda.common_easy.R;
import com.pda.common_easy.beanout.NoBillBeanOut;
import com.pda.common_easy.dialog.subcode.ProductAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;

import java.util.ArrayList;
import java.util.List;

public class HMDialog extends Dialog {
    private String TAG = "HMDialog";
    private ImageView ivexit;
    private EditText editText;
    private PriorityListener listener;
    private Context mContext;

    private View layout;

    public interface PriorityListener {
        void setActivityText();
    }

    public HMDialog(final Context context, int theme, PriorityListener priorityListener) {
        super(context, theme);
        layout = View.inflate(context, R.layout.dialog_hm, null);
        setContentView(layout);
        mContext = context;
        listener = priorityListener;
        ivexit = (ImageView) layout.findViewById(R.id.ivexit);
        editText = (EditText) layout.findViewById(R.id.eid);
        ivexit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
    }

    public void setText(String str){
        editText.setText(str);
    }

    @Override
    public void show() {
        PDApp.scanfhm = false;
        super.show();
    }


    @Override
    public void dismiss() {
        PDApp.scanfhm = true;
        super.dismiss();
    }
}


